#include<stdio.h>
int main()
{
    float average(float array[],int n);
    float score1[5]={1,2,3,4,5};
    float score2[10]={1,2,3,4,5,6,7,8,9,10};
    printf("第一个班级的成绩是%f\n",average(score1,5));
    printf("第二个班级的成绩是%f\n",average(score2,10));
    return 0;
}
float average(float array[],int n)
{
    int i;
    float aver,sum=0;
    for(i=0;i<n;i++)
        sum=sum+array[i];
        aver=sum/n;
        return(aver);//
}